package com.datacloud.service;

import java.util.List;

import com.datacloud.bean.*;


/**
 *车辆管理
 * Created by lv.
 */
public interface CarsManageService {
    /**
     * 获取未绑定车列表
     */
    List<VehiclesBean> getNoBindingCars();
    /**
     * 进行车辆绑定
     */
    boolean binding(int carid,String epc);
    /**
     * 获取所有线路
     */
    List<RoutesBean> findAllRoutes();
    /**
     * 根据EPC获取车辆信息
     */
    VehiclesBean findVehiclesByEpc(String epc);
    /**
     * 获取所有轮胎品牌
     */
    List<TireBrandsBean> findAllTireBrands();
    /**
     * 获取所有轮胎规格
     */
    List<TireModelsBean> findAllTireModels();
    /**
     * 获取所有轮胎花纹
     */
    List<TirePatternsBean> findAllTirePatterns();
    /**
     * 轮胎查询
     */
    TiresInfo findTiresInfo(String epc,String vehicleid,String wheelaliasid);
    /**
     * 轮胎绑定
     */
    int bindingTire(TiresBean info);
//    轮胎检查
   boolean tireCheck(int tireid,int depth,int step,int createid,String memo,int reasonid,int branchid);
//    轮胎检查事件写入
//    根据异常部位获取异常原因
     List<ReasonBeam>findReasonName();
//    在车检查的轮位操作
    boolean carsTirescheck(int id,int depth);

    /**
     * 轮胎装车
     */

    //通过epc获取id
    int getInstallIdByEpc(String installepc);
    int getUnloadIdByEpc(String unloadepc);
    int getVehicleIdByEpc(String vehicleepc);

    boolean updateTire(int installid,int unloadid,int vehicleid,int wheelid,int stockid,TireEventsBean install,TireEventsBean unload);
    /**
     * 轮胎换位
     */

    //    通过轮位1轮胎的epc获取轮胎1id
    int getTire1IdByEpc(String tire1epc);
    //    	通过轮位2轮胎的epc获取轮胎2id
    int getTire2IdByEpc(String tire2epc);

    boolean exchangeWheels(int tire1id, int vehicleid,int wheel2id,int tire2id,int wheel1id,
                           TireEventsBean install1,TireEventsBean unload1,
                           TireEventsBean install2,TireEventsBean unload2);
}
